{include file="public_head" /}
<style>
    .table{
        background-color: #cafffa;
        margin-bottom: 0;
    }
</style>
<!-- datatables -->
<link href="__STATIC__/js/datatables/jquery.dataTables.min.css" rel="stylesheet" type="text/css"/>
<!-- chk_3 -->
<link href="__STATIC__/css/chk_3.css" rel="stylesheet" type="text/css"/>

<body class="nav-md">

<div class="container body">


    <div class="main_container">

        {include file="public_sidebar,public_nav" /}

        <!-- page content -->
        <div class="right_col" role="main">
            <div class="">
                <div class="page-title">
                    <div class="title_left">
                        <h3>
                            商品规格管理
                        </h3>
                    </div>
                </div>
                <div class="clearfix"></div>

                <div class="row">

                    <div class="col-md-12 col-sm-12 col-xs-12">
                        <div class="x_panel">
                            <div class="x_title">
                                <h2>{$mate_title}</h2>
                                <a style="float: right" href="{:url('client/ShopGoodsSpec/create')}"
                                   class="btn btn-success btn-sm">创建商品规格</a>
                                <div class="clearfix"></div>
                            </div>
                            <div class="x_content">
                                <form name="form" id="form" method="post" action="">
                                    <table class="table table-striped table-bordered table-hover">
                                        <thead>
                                        <tr>
                                            <th style="width: 2%; padding: 10px;">
                                                <input type="checkbox" class="checkall"
                                                       onclick="CheckAll(this.checked);"/>
                                            </th>
                                            <th width="250">规格</th>
                                            <th>操作</th>
                                        </tr>
                                        </thead>
                                        <tbody>
                                        {empty name="data"}
                                            <tr><td colspan="3"><div style='font-size:24px;margin:30px 0;'>没有找到记录</div></td></tr>
                                        {/empty}
                                        {volist name="data" id="item"}
                                        <tr>
                                            <td align="center">
                                                <input type="checkbox" name="id[]" value="{$item.id}"/>
                                            </td>
                                            <td width="400">{$item.title}</td>
                                            <td>
                                                <a href="{:url('client/ShopGoodsSpec/attrList', ['attr_id' => $item['goods_type_id'],'id'=>$item['id']])}"
                                                   class="label label-warning">
                                                    <span class="fa fa-cog"></span>&nbsp;&nbsp;属性设置
                                                </a>

                                                &nbsp;&nbsp;&nbsp;&nbsp;
                                                <a href="{:url('client/ShopGoodsSpec/update', ['id' => $item['id']])}"
                                                   class="label label-primary">
                                                    <span class="fa fa-pencil"></span>&nbsp;&nbsp;编 辑
                                                </a>

                                                &nbsp;&nbsp;&nbsp;&nbsp;
                                                <a href="{:url('client/ShopGoodsSpec/destroy', ['id' => $item['id']])}"
                                                   class="label label-danger"
                                                   onClick="return confirm('系统会自动删除类别下所有子类别，确定删除吗?')"
                                                >
                                                    <span class="fa fa-times"></span>&nbsp;&nbsp;删 除
                                                </a>
                                            </td>
                                        </tr>
                                        {/volist}
                                        </tbody>
                                        <tbody align="left">
                                        <tr>
                                            <td colspan="3">
                                                <span>选择：</span>
                                                <a style="color:#428BCA" href="javascript:DelAllNone('{:url(\'client/ShopGoodsSpec/destroyAll\')}');" onclick="return ConfDelAll(0);">选择删除</a>
                                            </td>
                                        </tr>
                                        </tbody>
                                    </table>
                                </form>
                            </div>
                        </div>
                    </div>

                </div>
            </div>

        </div>
        <!-- /page content -->
    </div>

</div>

{include file="public_foot" /}
<!-- public -->
<script src="__STATIC__/js/public.js"></script>
<!-- layer -->
<script src="__STATIC__/js/layer.js"></script>